package Game;

import Tz.Dive;

/**
 * 玩家
 */
public class Role {
    /**
     * 偷盗
     * @param rob
     */
    public void service(Rob rob){
        rob.rob();

    }

    /**
     * 打猎
     * @param hunt
     */
    public void service1(Hunt hunt){
        hunt.hunt();

    }

    /**
     *
     * 采矿
     * @param mine
     */
    public void service2(Mine mine){
        mine.mine();
    }

    /**
     * 攻击
     * @param attack
     */
    public void service3(Attack attack){
        attack.attack();

    }

    /**
     * 治疗
     * @param treat
     */
    public void service4(Treat treat){
        treat.treat();

    }

    /**
     * 抵抗
     * @param defend
     */
    public void service5(Defend defend){
        defend.defend();

    }

    /**
     * 会攻击
     * @param hunter
     * @param farmer
     * @param robber
     */
    public void attack(Hunter hunter,Farmer farmer,Robber robber){
           farmer.attack();
           robber.attack();
           hunter.attack();
    }

    /**
     * 会治疗的
     * @param farmer
     * @param doctor
     */
    public void treat(Farmer farmer,Doctor doctor){
        farmer.treat();
        doctor.treat();
    }



    public static void main(String[] args) {
        Role role =new Role();
        role.service(new Robber("小修",20));


        role.service1(new Hunter("小代",21));

        role.service2(new Farmer("小强",13));

        role.service5(new Soldier("小明",6));
        System.out.println("  ");
        role.attack(new Hunter("小代",21),new Farmer("小强",13),new Robber("小修",20));
        System.out.println("  ");
        role.treat(new Farmer("小强",13),new Doctor("小吴",20));

    }
}



